package com.csnf.controller;


import com.csnf.dto.MerchantAccountDto;
import com.csnf.dto.ResponseObject;
import com.csnf.service.MerchantExamineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/examine")
public class MerchantExamineController {
    @Autowired
    private MerchantExamineService merchantExamineService;
    @RequestMapping("/merchant")
    public ResponseObject merchantExamine(@RequestBody MerchantAccountDto merchantAccountDto){
        int merchantExamine = merchantExamineService.merchantExamine(merchantAccountDto);
        if (merchantExamine>0){
            return ResponseObject.success("审核成功");
        }else {
            return ResponseObject.error("审核失败");
        }
    }
}
